Fix C89 compilation issue. (#467711, The Written Word)
authorBehdad Esfahbod <behdad@gnome.org>
Wed, 21 Nov 2007 09:32:35 +0000 (09:32 +0000)
committerBehdad Esfahbod <behdad@src.gnome.org>
Wed, 21 Nov 2007 09:32:35 +0000 (09:32 +0000)
2007-11-21  Behdad Esfahbod  <behdad@gnome.org>

        * tests/testrichtext.c (setup_buffer): Fix C89 compilation issue.
        (#467711, The Written Word)

svn path=/trunk/; revision=19022

ChangeLog
tests/testrichtext.c

index a5bd320f2cdde2ddd94ae6340139dc3043f646da..373075fcf13932eeacf632930e649858b64c7182 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-21  Behdad Esfahbod  <behdad@gnome.org>
+
+       * tests/testrichtext.c (setup_buffer): Fix C89 compilation issue.
+       (#467711, The Written Word)
+
 2007-11-21  Ross Burton  <ross@openedhand.com>
 
        * gdk/x11/gdksettings.c:
index c8663049da4dd65cc21328eac1bb9a77a8bc3121..d59f608b7bf01db7c5aadccb7ca23a81913b0e37 100644 (file)
@@ -64,12 +64,14 @@ setup_buffer (GtkTextBuffer *buffer)
 {
   const guint tlen = strlen (example_text);
   const guint tcount = 17;
-  GtkTextTag *tags[tcount];
+  GtkTextTag **tags;
   GtkTextTagTable *ttable = gtk_text_buffer_get_tag_table (buffer);
   GSList *node, *slist = NULL;
   GdkAtom atom;
   guint i;
 
+  tags = g_malloc (sizeof (GtkTextTag *) * tcount);
+
   /* cleanup */
   gtk_text_buffer_set_text (buffer, "", 0);
   gtk_text_tag_table_foreach (ttable, text_tag_enqueue, &slist);
@@ -104,6 +106,8 @@ setup_buffer (GtkTextBuffer *buffer)
   atom = gtk_text_buffer_register_deserialize_tagset (buffer, NULL);
   gtk_text_buffer_deserialize_set_can_create_tags (buffer, atom, TRUE);
 
+  g_free (tags);
+
   return atom;
 }